package com.iot.gateway.exception;

import lombok.Getter;

/**
 * @Description 统一异常, 方便统一捕获
 * @Author xinggq
 * @Date 2025/5/16
 */
@Getter
public class CommonException extends RuntimeException {

  /**
   * 错误编码
   */
  private final String code;

  public CommonException(String code, String message) {
    super(message);
    this.code = code;
  }

  public CommonException(String code) {
    super();
    this.code = code;
  }

  public CommonException(String code, String message, Throwable cause) {
    super(message, cause);
    this.code = code;
  }

}
